package com.shop.controller;

import com.shop.constant.MessageConstant;
import com.shop.entity.Result;
import com.shop.pojo.GoodsKind;
import com.shop.service.GoodsKindService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@RestController
@RequestMapping("/goodskind")
@Api(tags = "商品分类管理")
public class GoodsKindController {
    @Reference
    private GoodsKindService goodsKindService;

    @GetMapping("/findAll")
    @ApiOperation("显示商品种类接口")
    public Result findAll(){
        List<GoodsKind> list=goodsKindService.findAll();
        return new Result(true,MessageConstant.QUERY_GOODSKIND_SUCCESS,list);
    }

}
